

package w83b.w83bUtilidadesComunes;

import java.io.Serializable;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Locale;

public class W83bLocaleString implements Serializable {
    /**
	 * Comment for <code>serialVersionUID</code>
	 */
	private static final long serialVersionUID = 1L;
	protected Hashtable string;
    
    protected W83bLocaleString () {
    }
    
    public W83bLocaleString (Hashtable localeString) {
        string = localeString;
    }

    public String getString (Locale locale) {
        String strTmp = (String)string.get(locale);
        if (strTmp == null) {
            Iterator i = string.values().iterator();
            if (i.hasNext()){
                strTmp = (String)i.next();
            }
        }
        
        return strTmp;
    }
    
    public Enumeration getAllLocales() {
        return string.keys();
    }
    
}
